import { SHOW_LOGIN_MODULE } from '../action/actionTypes'
import { Map } from 'immutable'

export const showLoginModule = (state = Map({
  showLogin: () => {}
}), action) => {
  switch (action.type) {
    case SHOW_LOGIN_MODULE:
      if (action.show.has('showLogin')) {
        state = state.set('showLogin', action.show.get('showLogin'))
      }
      return state
    default:
      return state
  }
}
